/*
 * @Author: sonss
 * @Date: 2024-08-20 17:33:18
 * @LastEditTime: 2024-08-22 11:39:52
 * @FilePath: /ss-file-antd/src/services/account.ts
 * @Description:  我的账号
 */
import { request } from '@umijs/max';

/**
 * @description: 基本信息
 * @return {*}
 */
export async function GetInfo() {
  return request<API.Result<API.CurrentUser>>('/v1/account/info', {
    method: 'POST',
  });
}

// 详情
export async function Detail() {
  return request<API.Result<ACCOUNT.DetailResponse>>('/v1/account/detail', {
    method: 'POST',
  });
}

// 保存
export async function Save(data: ACCOUNT.SaveForm) {
  return request<API.Result<any>>('/v1/account/save', {
    method: 'POST',
    data,
  });
}

// 修改密码
export async function EditPwd(data: ACCOUNT.EditPwdForm) {
  return request<API.Result<any>>('/v1/account/edit-pwd', {
    method: 'POST',
    data,
  });
}
